( function ( D ) {

    D.attract = function ( x1, y1, x2, y2 ) 
    {
        var xDiff = x2 - x1,
            yDiff = y2 - y1,
            d = Math.sqrt( Math.pow( xDiff, 2 ) + Math.pow( yDiff, 2 ) ),
            m = 800 * Math.pow( d, -2 );

        if ( d < 150 ) 
        {
            return { x: 0, y: 0 };
        }

        return {
          x: m * xDiff / d,
          y: m * yDiff / d
        };

    }

} ) ( DESANTI );
